package com.disgruntledbots;

import java.nio.CharBuffer;

import com.examplebox2dtest.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class JsonActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.activity_json_output);
		Log.w("com.disgruntledbots", "OnCreate Main Menu");

		Button menuButton = (Button) findViewById(R.id.Level1);
		TextView text = (TextView) findViewById(R.id.jsonText);
		Intent i = getIntent();
		if(i != null){
			String json = i.getStringExtra("JSON");
			if(json != null){
				text.setText(json);
			}
		}
		
		menuButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Intent openFirstLevel = new Intent(JsonActivity.this, MainMenuActivity.class);
                startActivity(openFirstLevel);
                JsonActivity.this.finish();
            }
        });
        
	}
}
